package project.pianpian.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import project.pianpian.entity.User;

import java.util.List;

@Mapper
@Repository
@Service
public interface UserMapper extends BaseMapper<User> {
    int insertUser(User user);

    List<User> findByName(@Param("start") int start, @Param("size")int size, @Param("username") String username);

    int getTotalCount(@Param("username") String username);
}
